//新品定义：新零售生效日与商品建立日之间的间隔如果小于8天，无链交叉，非CPK

var result_20 = JSON.parse('{"CODE":0, "ACTION":"","LEVEL":"", "MSG":"","DATA":"","RULE":"20"}');
var itemCreateDate = new Date(ITEM_CREATE_DT);
var crossSeqNbr = getCrossSeqNbr(ITEM_NBR, JSON_CROSS_REF);
var NEW_ITEM_FLAG = false;

if (betweenDay(itemCreateDate, EFF_DATE) < 8
    && isNull(crossSeqNbr) && isNull(JSON_CPK_UNIT)) {
    NEW_ITEM_FLAG = true;
    if ((!isNull(RETAIL_TYPE) && RETAIL_TYPE != 'BP')){
        result_20.CODE = 2;
        result_20.ACTION = "CHECKING_REPORT";
        result_20.MSG = "新品自建立8天以内不能做有原价的促销";
    }

}

JSON.stringify(result_20);